package com.haiheng.module_main.adapter.bookcar

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.viewbinding.ViewBinding
import com.haiheng.library_base.adapter.BaseAdapter
import com.haiheng.module_main.R
import com.haiheng.module_main.databinding.ItemBookCarInfoBinding
import com.haiheng.module_main.databinding.ItemBookCarListBinding

/**
 *
 * @Des:
 * @Author: hwz
 * @Date:2024/8/20 0020
 * @Version: 1.0
 */
class BookCarInfoAdapter:BaseAdapter<Pair<String, String>>() {
    override fun onCreateViewBinding(viewType: Int): (LayoutInflater, ViewGroup, Boolean) -> ViewBinding {
        return ItemBookCarInfoBinding::inflate
    }

    override fun onItemView(holder: ViewBindHolder, position: Int, item: Pair<String, String>) {
        var binding = holder.binding as ItemBookCarInfoBinding
        binding.tvName.setText(item.first)
        binding.tvValue.setText(item.second)
    }


}